from django.db import models
from django.db.models import CASCADE


# 映射数据库表-练习题目内容
class ExerciseContent(models.Model):
    """
    exerciseContent = 题目内容
    optionA = A选项
    optionB = B选项
    optionC = C选项
    optionD = D选项
    exerciseAnswer = 正确答案
    """
    exerciseContent = models.CharField(max_length=255)
    optionA = models.CharField(max_length=255)
    optionB = models.CharField(max_length=255)
    optionC = models.CharField(max_length=255)
    optionD = models.CharField(max_length=255)
    exerciseAnswer = models.CharField(max_length=255)


# 映射数据库表-练习历史
class ExerciseHistory(models.Model):
    """
    userId = 用户Id
    exerciseContent = 题目内容
    userChosen = 答题选择
    exerciseAnswer = 正确答案
    """
    userId = models.CharField(max_length=255)
    exerciseContent = models.CharField(max_length=255)
    userChosen = models.CharField(max_length=255)
    exerciseAnswer = models.CharField(max_length=255)


